CSharpTest.Net
BPlusTreeOptions<TKey,TValue> Class Members
See Also  Properties  Methods  Send Feedback Download Help File
CSharpTest.Net.BPlusTree Assembly > CSharpTest.Net.Collections Namespace : BPlusTreeOptions<TKey,TValue> Class


Glossary Item Box

The following tables list the members exposed by BPlusTreeOptions<TKey,TValue>.

Protected Constructors

 NameDescription
Protected ConstructorBPlusTreeOptions<TKey,TValue> ConstructorConstructs the options configuration to initialize a BPlusTree instance  
Top

Public Properties

 NameDescription
Public PropertyBTreeOrderA quick means of setting all the min/max values for the node counts using this value as a basis for the Maximum fields and one-quarter of this value for Minimum fields provided the result is in range.  
Public PropertyCacheKeepAliveFactoryCacheKeepAliveFactory provides a delegate to inject an implementation of the IObjectKeepAlive interface while then igoring all the other CacheKeepAliveXXX properties.  
Public PropertyCacheKeepAliveMaximumHistoryDetermins maximum number of recently visited nodes to keep alive in memory. This number defines the history size, not the number of distinct nodes. The ceiling is always respected reguardless of the timeout. Specify a value of 0 to disable history keep alive.  
Public PropertyCacheKeepAliveMinimumHistoryDetermins minimum number of recently visited nodes to keep alive in memory. This number defines the history size, not the number of distinct nodes. This number will always be kept reguardless of the timeout. Specify a value of 0 to allow the timeout to empty the cache.  
Public PropertyCacheKeepAliveTimeoutIf the cache contains more that CacheKeepAliveMinimumHistory items, this timeout will start to remove those items until the cache history is reduced to CacheKeepAliveMinimumHistory. It is important to know that the BPlusTree itself contains no theads and this timeout will not be respected if cache is not in use.  
Public PropertyCachePolicyDetermines how long loaded nodes stay in memory, Full keeps all loaded nodes alive and is the most efficient, The default Recent keeps recently visited nodes alive based on the CacheKeepAlive properties, and None does not cache the nodes at all but does maintain a cache of locks for each node visited.  
Public PropertyCallLevelLockDefines a reader/writer lock that used to control exclusive tree access when needed. The public methods for EnableCount(), Clear(), and UnloadCache() each acquire an exclusive (write) lock while all other public methods acquire a shared (read) lock. By default this lock is non-operational (an instance of IgnoreLocking) so if you need the above methods to work while multiple threads are accessing the tree, or if you exclusive access to the tree, specify a lock instance. Since this lock is primarily a read-heavy lock consider using the ReaderWriterLocking or SimpleReadWriteLocking.  
Public PropertyCreateFileGets or sets the file-create policy used when backing with a file storage  
Public PropertyFileBlockSizeGets or sets the number of bytes per file-block used in the file storage  
Public PropertyFileNameGets or sets the FileName that should be used to store the BTree  
Public PropertyFileVersionReturns the version this option set is compatable with.  
Public PropertyKeyComparerDefines a custom IComparer<T> to be used for comparing keys  
Public PropertyKeySerializerAccesses the key serializer given to the constructor  
Public PropertyLockingFactoryGets or sets the locking factory to use for accessing shared data. The default is WriterOnlyLocking() which does not perform read locks, rather it will rely on the cache of the btree and may preform dirty reads. You can use any implementation of ILockFactory; however, the SimpleReadWriteLocking seems to perform the most efficiently for both reader/writer locks. Additionally wrapping that instance in a ReserveredWriterLocking() instance will allow reads to continue up until a writer begins the commit process. If you are only accessing the BTree instance from a single thread this can be set to IgnoreLocking. Be careful of using ReaderWriterLocking as the write-intesive nature of the BTree will suffer extreme performance penalties with this lock.  
Public PropertyLockTimeoutGets or sets the number of milliseconds to wait before failing a lock request, the default of two minutes should be more than adequate.  
Public PropertyMaximumChildNodesThe largest number of child nodes that should be linked to before refactoring the tree to split this node into two. This property has a side-effect on MinimumChildNodes to ensure that it continues to be at most half of MaximumChildNodes.  
Public PropertyMaximumValueNodesThe largest number of values that should be contained in this node before refactoring the tree to split this node into two. This property has a side-effect on MinimumValueNodes to ensure that it continues to be at most half of MaximumValueNodes.  
Public PropertyMinimumChildNodesThe smallest number of child nodes that should be linked to before refactoring the tree to remove this node. In a 'normal' and/or purest B+Tree this is always half of max; however for performance reasons this B+Tree allow any value equal to or less than half of max but at least 2.  
Public PropertyMinimumValueNodesThe smallest number of values that should be contained in this node before refactoring the tree to remove this node. In a 'normal' and/or purest B+Tree this is always half of max; however for performance reasons this B+Tree allow any value equal to or less than half of max but at least 2.  
Public PropertyReadOnlySets the BTree into a read-only mode (only supported when opening an existing file)  
Public PropertyStorageSystemSets the custom implementation of the storage back-end to use for the BTree  
Public PropertyStorageTypeCan be used to explicitly specify the storage type, or by simply providing a file name this will be done for you. If no file name was specified the default is to use a memory store.  
Public PropertyValueSerializerAccesses the key serializer given to the constructor  
Top

Public Methods

 NameDescription
Public MethodCalcBTreeOrderCalculates default node-threasholds based upon the average number of bytes in key and value  
Public MethodCloneCreates a shallow clone of the configuration options.  
Top

Protected Methods

 NameDescription
Protected MethodCalculateOrderCalculates default node-threasholds based upon the average number of bytes in key and value  
Protected MethodSetLogFileSets the transaction log to use  
Protected MethodSetStorageCacheEnables or disables the caching and reordering of node write operations  
Top

See Also

Generated with Document! X 2011 by Innovasys